﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Staff
{
    class Staff
    {
        //        定义一个员工类，存放用户的工号、姓名、性别、学历和部门信息；
        //定义两个构造函数:
        //一个是无参构造函数，学历默认为专科；
        //一个有参构造函数，根据参数对类的属性进行初始化。
        //无参的构造方法
       public int id;
        public string name;
        public string sex;
        public string education;
        public string department;

        //将学历默认值
        public static string Education;
        public Staff()
        {

        }
        public Staff(int id,string name,string sex,string education,string department)
        {
            this.id = id;
            this.name = name;
            this.sex = sex;
            this.education = education;
            this.department = department;
        }

        public void Print()
        {
            Console.WriteLine("工号："+this.id);
            Console.WriteLine("姓名：" + this.name);
            Console.WriteLine("性别：" + this.sex);
            Console.WriteLine("学历：" + this.education);
            Console.WriteLine("部门：" + this.department);

        }
        public void Print1()
        {
            Console.WriteLine("工号：" + this.id);
            Console.WriteLine("姓名：" + this.name);
            Console.WriteLine("性别：" + this.sex);
            
            Console.WriteLine("部门：" + this.department);

        }
        public static void EduPrint()
        {
            Console.WriteLine("默认学历："+Education);
        }
    }
}
